
<template>
  <div></div>
</template>

<script>
export default {

}
</script>

<style>

</style>

<!-- <template>
  <a-layout>
    <a-layout-sider v-model:collapsed="collapsed" :trigger="null" collapsible>
      <div class="left_tops">

      </div>
      <a-menu v-model:selectedKeys="selectedKeys" theme="dark" mode="inline" forceSubMenuRender>
        <a-menu-item key="/">工作台</a-menu-item>

        <a-sub-menu key="/setList" title="文章管理">
          <a-menu-item key="/textall">所有文章</a-menu-item>
          <a-menu-item key="/setList">分类设置</a-menu-item>
          <a-menu-item key="/settag">标签管理</a-menu-item>
        </a-sub-menu>
        <a-menu-item key="/page">页面管理</a-menu-item>
        <a-menu-item key="/knowledge">知识小测</a-menu-item>
        <a-menu-item key="/poster">海报管理</a-menu-item>
        <a-menu-item key="/comment">评论管理</a-menu-item>
        <a-menu-item key="/files">文件管理</a-menu-item>
        <a-menu-item key="/searchs">搜索记录</a-menu-item>
        <a-menu-item key="/visit">访问统计</a-menu-item>
        <a-menu-item key="/users">用户管理</a-menu-item>
        <a-menu-item key="/edit">系统管理</a-menu-item>
      </a-menu>
    </a-layout-sider>
    <a-layout>
      <a-layout-header style="background: #fff; padding: 0" class="tit_box">
        <div class="tit_right">
          <UserInfo />
        </div>

      </a-layout-header>
      <a-layout-content :style="{
        margin: '24px 16px',
        padding: '24px',
        background: '#eee',
      }">
        <router-view />
      </a-layout-content>
    </a-layout>
  </a-layout>
</template>
<script lang="ts" setup>

import { defineComponent, ref, onMounted, watch } from "vue";
import { RouterType } from "../types";
import { useRouter, useRoute } from "vue-router";
import { storeToRefs } from "pinia";
import { useLogin } from "../store/login"
import UserInfo from "../components/UserInfo.vue"
const route = useRoute();
const router = useRouter();


const logins = useLogin()
const { userobj } = storeToRefs(logins)
// console.log(userobj.value,"user")
const selectedKeys = ref<string[]>(JSON.parse(localStorage.getItem("path")||JSON.stringify(['/']))),
  collapsed = ref<boolean>(false);

watch(selectedKeys, (newVal) => {
  router.push(newVal[0])
})
watch(() => route.path, (val) => {
  localStorage.setItem("path", JSON.stringify([route.path]))
  selectedKeys.value = [val]
})




</script>
<style lang="scss">
.ant-layout {
  width: 100%;
  height: 100%;
}

#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s;
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: #1890ff;
}

#components-layout-demo-custom-trigger .logo {
  height: 32px;
  background: rgba(255, 255, 255, 0.3);
  margin: 16px;
}

.site-layout .site-layout-background {
  background: #fff;
}

.left_tops {
  height: 80px;
  width: 100%;
}

.tit_box {
  display: flex;
  justify-content: end;

  .tit_right {
    line-height: 20px;
  }
}
.ant-layout-content{
  overflow: auto;
  &::-webkit-scrollbar{
      width: 3px;
  }
}
</style> -->
